<?php
$userRole = $this->Session->read('Auth.User.role');
switch($userRole){
	case ROLE_AUTHOR:
		$tabLink = array(
		array(
			'label' => __('All articles'),
			'link' => array('controller'=> 'articles','action' => 'index'),
		),
		array(
			'label' => __('Accept articles'),
			'link' => array('controller'=> 'articles','action' => 'filter', 'accept'),
		),
		array(
			'label' => __('Reject articles'),
			'link' => array('controller'=> 'articles','action' => 'filter', 'reject'),
		));
		break;
	case ROLE_EDITOR:
		$tabLink = array(
		array(
			'label' => __('All articles'),
			'link' => array('controller'=> 'articles','action' => 'index'),
		),
		array(
			'label' => __('Uncheck articles'),
			'link' => array('controller'=> 'articles','action' => 'filter', 'uncheck'),
		),
		array(
			'label' => __('Recent articles'),
			'link' => array('controller'=> 'articles','action' => 'filter', 'recent'),
		),
		array(
			'label' => __('Checked articles'),
			'link' => array('controller'=> 'articles','action' => 'filter', 'checked'),
		));
		break;
	default:
		$tabLink = array();
}
echo '<ul class="nav nav-tabs nav-stacked">';
foreach($tabLink as $key => $tab){
	echo '<li ';
	if(isset($tabActive) && ($key == $tabActive)){
		echo ' class="active"';
	}
	echo '>';
	echo $this->Html->link($tab['label'],$tab['link']);
	echo '</li>';
}
echo '</ul>';
?>